package com.sky.service;

import com.sky.dto.*;
import com.sky.result.PageResult;
import com.sky.vo.OrderPaymentVO;
import com.sky.vo.OrderStatisticsVO;
import com.sky.vo.OrderSubmitVO;
import com.sky.vo.OrderVO;

/**
 * The interface Order service.
 */
public interface OrderService {

    /**
     * 用户下单
     *
     * @param ordersSubmitDTO the orders submit dto
     * @return order submit vo
     */
    OrderSubmitVO submitOrder(OrdersSubmitDTO ordersSubmitDTO);

    /**
     * 用户端订单分页查询
     *
     * @param page     the page
     * @param pageSize the page size
     * @param status   the status
     * @return page result
     */
    PageResult pageQuery4User(int page, int pageSize, Integer status);


    /**
     * 查询订单详情
     *
     * @param id the id
     * @return order vo
     */
    OrderVO details(Long id);

    /**
     * 用户取消订单
     *
     * @param id the id
     * @throws Exception the exception
     */
    void userCancelById(Long id) throws Exception;

    /**
     * 再来一单
     *
     * @param id the id
     */
    void repetition(Long id);

    /**
     * 条件搜索订单
     *
     * @param ordersPageQueryDTO the orders page query dto
     * @return page result
     */
    PageResult conditionSearch(OrdersPageQueryDTO ordersPageQueryDTO);


    /**
     * 接单
     *
     * @param ordersConfirmDTO the orders confirm dto
     */
    void confirm(OrdersConfirmDTO ordersConfirmDTO);

    /**
     * 拒单
     *
     * @param ordersRejectionDTO the orders rejection dto
     * @throws Exception the exception
     */
    void rejection(OrdersRejectionDTO ordersRejectionDTO) throws Exception;

    /**
     * 商家取消订单
     *
     * @param ordersCancelDTO the orders cancel dto
     * @throws Exception the exception
     */
    void cancel(OrdersCancelDTO ordersCancelDTO) throws Exception;

    /**
     * 派送订单
     *
     * @param id the id
     */
    void delivery(Long id);

    /**
     * 完成订单
     *
     * @param id the id
     */
    void complete(Long id);


    /**
     * 各个状态的订单数量统计
     *
     * @return the statistics
     */
    OrderStatisticsVO getStatistics();


    /**
     * Payment order payment vo.
     *
     * @param ordersDTO the orders dto
     * @return the order payment vo
     */
    OrderPaymentVO payment(OrdersDTO ordersDTO);

    /**
     * 客户催单
     *
     * @param id the id
     */
    void remind(Long id);

    /**
     * Pay success.
     *
     * @param number the number
     */
    void paySuccess(String number);
}
